<template>
	<view class="content-box">
		<view class="label-item" v-for="(item,index) in labelList" :key="index" @click="clickLabel(index)">
			<text :class="['label-text',item.active?'label-text-act':'']">{{item.title}}</text>
			<uv-icon :name="item.active?'arrow-up-fill': 'arrow-down-fill'"
				:color="item.active?'#2979ff':'#666'" size="28rpx"></uv-icon>
		</view>
	</view>
</template>
<script>
	/**
	 * 自定义横向联排带状态按钮
	 */
	export default {
		name: 'wjf-iconfont',
		props: {
			labelList: {
				type: Array,
				default () {
					return []
				}
			},
			color: {
				type: String,
				default: '#333333'
			},
			size: {
				type: [Number, String],
				default: 16
			},
		},
		data() {
			return {

			}
		},
		methods: {
			clickLabel(index) {
				this.$emit('resClick', index)
			}
		}
	}
</script>
<style lang="scss" scoped>
	.content-box {
		display: flex;
		flex-direction: row;
	}

	.label-item {
		display: flex;
		flex-direction: row;
		align-items: center;
		max-width: 200rpx;
		min-width: 100rpx;
		padding: 10rpx;
	}
	.label-text{
		font-size: 30rpx;
		color: #666;
	}
	.label-text-act{
		color: #2979ff;
	}
	
</style>